<?php

class Pad {
	public static function Render($guid, $name, $posts) {
		$padHTML = '';
		$padHTML .= '<div class="Pad" id="Pad_'.$guid.'">';
		$padHTML .= '<div class="PadTabs" id="Pad_Tabs_'.$guid.'">';
			$padHTML .= '<a href="javascript:void();" id="Pad_Main_Tab_'.$guid.'" Title="Pad" class="MainTab"></a>';
			$padHTML .= '<a href="javascript:void();" id="Pad_Post_Tab_'.$guid.'" title="Post" class="PostTab"></a>';
			$padHTML .= '<a href="javascript:void();" id="Pad_Settings_Tab_'.$guid.'" title="Settings" class="SettingsTab"></a>';
			$padHTML .= '<div class="PadTabsTitle" id="Pad_Tabs_Title_'.$guid.'">'.$name.'</div>';
		$padHTML .= '</div>';
		$padHTML .= '<div id="Pad_Base_'.$guid.'" class="PadBase">';
			$padHTML .= '<div class="PadMainContent" id="Pad_Main_Content_'.$guid.'">';
				for($i=0;$i<count($posts);$i++) {
					$padHTML .= $posts[$i]->Render();
				}
			$padHTML .= '</div>';
			$padHTML .= '<div class="PadPostContent" id="Pad_Post_Content_'.$guid.'">';
				$padHTML .= '<form class="PadPostForm">';
					$padHTML .= '<textarea class="PadTextArea"></textarea>';
					$padHTML .= '<input class="PadCheckbox" id="Pad_Post_Private_Checkbox_'.$guid.'" type="checkbox" title="Private Post" value="true"/><label for="Pad_Post_Private_Checkbox_'.$guid.'" title="Private Post">Private Post</label>';
					$padHTML .= '<a href="javascript:void(0);" title="Post as Event" class="PadPostAsEventBtn"></a>';
					$padHTML .= '<input type="submit" value="" class="PadSavePostBtn" title="Post to Pad" />';
				$padHTML .= '</form>';
			$padHTML .= '</div>';
			$padHTML .= '<div class="PadSettingsContent" id="Pad_Settings_Content_'.$guid.'">';				
			$padHTML .= '</div>';
		$padHTML .= '</div>';
		$padHTML .= '</div>';
		return $padHTML;
	}
}
?>